import request from '@/utils/request'

// 查询还款计划列表
export function listDealFinancingRepayment(query) {
  return request({
    url: '/repayment/dealFinancingRepayment/list',
    method: 'get',
    params: query
  })
}

// 查询还款计划详细
export function getDealFinancingRepayment(id) {
  return request({
    url: '/repayment/dealFinancingRepayment/' + id,
    method: 'get'
  })
}

// 保存还款计划
export function saveDealFinancingRepayment(data) {
  return request({
    url: '/repayment/dealFinancingRepayment/save',
    method: 'post',
    data: data
  })
}

// 删除还款计划
export function delDealFinancingRepayment(id) {
  return request({
    url: '/repayment/dealFinancingRepayment/' + id,
    method: 'delete'
  })
}

// 导出还款计划
export function exportDealFinancingRepayment(query) {
  return request({
    url: '/repayment/dealFinancingRepayment/export',
    method: 'get',
    params: query
  })
}

// 计算本次应付总额
export function totalAmountPayableCalculate(data) {
  return request({
    url: '/repayment/dealFinancingRepayment/totalAmountPayableCalculate',
    method: 'post',
    data: data
  })
}

// 计算本次实际支付总额
export function totalAmountActuallyPaidCalculate(data) {
  return request({
    url: '/repayment/dealFinancingRepayment/totalAmountActuallyPaidCalculate',
    method: 'post',
    data: data
  })
}
